using System.Runtime.InteropServices;

namespace Mistral.FlashSecure
{
	public static class User32
	{
		[DllImport("User32.dll", CharSet=CharSet.Auto)]
		public static extern ushort GetKeyState(int virtKey);

		const ushort MASK = 0x8000;
		public static bool IsKeyPressed( int virtKey )
		{
			return ( ( GetKeyState( virtKey ) & MASK ) > 0 );
		}

	}
}